package java_abstraction.instance_of;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

public class InstanceofTest {

	public static void main(String[] args) {
		Map m = new HashMap();
		
		System.out.println("m instanceof Map: " + (m instanceof Map));
		System.out.println("m instanceof HashMap: " + (m instanceof HashMap));
		System.out.println("m instanceof Object: " + (m instanceof Object));
		System.out.println("m instanceof Date: " + (m instanceof Date));
		m = null;
		System.out.println("m = null, m instanceof HashMap: " + (m instanceof HashMap));

	}

}
